import axios from '@/tool/axiso.js'
// 角色列表----------
export const getRoles = () => axios.get('roles')
//权限管理----------
export const Management = (type) => axios.get(`rights/${type}`)
// 添加角色-------------------
export const AddRoles = (obj) => axios.post('roles', obj)
// 删除角色--------------------
export const DelRoles = (id) => axios.delete(`roles/${id}`)
// 通过ID查询角色 数据回填--------------------
export const Edit_Role = (id) => axios.get(`roles/${id}`)
// 修改角色--------------------
export const Edit_rights = (obj) => axios.put(`roles/${obj.id}`, obj)
// 角色授权--------------------
export const Role_Authorization = (RolesId, obj) => axios.post(`roles/${RolesId}/rights`, obj)